package Try;

import java.io.*;

public class Main11 {
    public static void main(String[] args) throws IOException {
        File file = new File("C:\\Users\\ruanjie\\Desktop\\test_pairs.txt");
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
        String line;
        File writeFile = new File("C:\\Users\\ruanjie\\Desktop\\test_pairs_self.txt");
        BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(writeFile)));
        while ((line=bufferedReader.readLine())!=null){
            String[] strs = line.split(" ");
            String cloth = strs[0].replace("0.jpg","1.jpg");
            bufferedWriter.write(strs[0]+" "+cloth);
            bufferedWriter.newLine();
        }
        bufferedWriter.flush();
        bufferedWriter.close();
        bufferedReader.close();
    }
}
